package org.mspring.mlog.task;

import org.mspring.mlog.service.CommentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 多说同步任务
 *
 * @author GaoYoubo
 * @since 2015/2/20
 */
@Component
public class DuoshuoSyncTask {
    private static final Logger LOG = LoggerFactory.getLogger(DuoshuoSyncTask.class);

    private CommentService commentService;

    public void doTask() throws Exception {
        LOG.info("执行多说同步任务...");
        commentService.syncFromDuoshuo();
    }

    @Autowired
    public void setCommentService(CommentService commentService) {
        this.commentService = commentService;
    }
}
